DO BOXT WITH 21,0,'PLEASE WAIT, INDEXING PROCESS !!!!...','GR+*','R',.F.,.T.
SET COLO TO GR+/RB,R/GR+
USE
DR2='N:'
F1='REVENUEX'
F2='ACTIVITX'
F21='ACTITYPX'
F3='ACT_PROX'
F4='ACT_PHAX'
F5='DOCT_FEX'
F11='REVDATEX'
F12='REVNAMEX'
F10='REVENUEY'
F20='ACT_YTD'
F22='ACTITYP2'
F30='ACT_PROY'
F31='ACT_RPAT'
F40='ACT_PHAY'
F41='ACT_HPAT'
F50='DOCT_YTD'
F110='REVDAT2X'
F120='REVNAM2X'
F121='REVCASH'
F1A='REVENUEX.DBF'
F2A='ACTIVITX.DBF'
F3A='ACT_PROX.DBF'
F4A='ACT_PHAX.DBF'
F5A='DOCT_FEX.DBF'
F10A='REVENUEY.DBF'
F20A='ACT_YTD.DBF'
F30A='ACT_PROY.DBF'
F40A='ACT_PHAY.DBF'
F50A='DOCT_YTD.DBF'
F50B='DOCTINVX'
DO SIGNIT
if file("&dr2&f10A")
   IF NET_USE("&DR2&F10",.T.,'1',10)
      DO SIGNI
      INDE ON PAT_FILCOD+DTOS(DATE_VISIT)+INV_NBER TO &DR2&F10
      DO SIGNI
      INDE ON DTOS(DATE_VISIT)+INV_NBER TO &DR2&F110
      DO SIGNI
      INDE ON PAT_NAME+PAT_F_NAME+DTOS(DATE_VISIT)+INV_NBER TO &DR2&F120
      DO SIGNI
      INDE ON CASH_NAME+DTOC(DATE_VISIT) TO &DR2&F121
   ENDIF
ENDIF
USE
if file("&dr2&f20A")
   IF NET_USE("&DR2&F20",.T.,'1',10)
      DO SIGNI
      INDE ON DTOS(DATE_VISIT)+INV_NBER TO &DR2&F20
      DO SIGNI
      INDE ON PAT_CODTYP+DTOS(DATE_VISIT)+INV_NBER TO &DR2&F22
   ENDIF
ENDIF
USE
if file("&dr2&f30A")
   IF NET_USE("&DR2&F30",.T.,'1',10)
      DO SIGNI
      INDE ON DTOS(DATE_VISIT)+INV_NBER TO &DR2&F30
      DO SIGNI
      INDE ON INV_NBER TO &DR1&F31
   ENDIF
ENDIF
USE
if file("&dr2&f40A")
   IF NET_USE("&DR2&F40",.T.,'1',10)
      DO SIGNI
      INDE ON DTOS(DATE_VISIT)+INV_NBER TO &DR2&F40
      DO SIGNI
      INDE ON INV_NBER TO &DR1&F41
   ENDIF
ENDIF
USE
If file("&dr2&f50A")
   IF NET_USE("&DR2&F50",.T.,'1',10)
      DO SIGNI
      INDE ON DOC_CODE+DTOS(DATE_VISIT)+INV_NBER TO &DR2&F50
      INDE ON INV_NBER TO &DR2&F50B
   ENDIF
ENDIF
USE
IF LIM=1
SET COLO TO GR+/RB,R/GR+
   if file("&dr2&f1A")
      IF NET_USE("&DR2&F1",.T.,'1',10)
         DO SIGNI
         INDE ON PAT_FILCOD+DTOS(DATE_VISIT)+INV_NBER TO &DR2&F1
         DO SIGNI
         INDE ON DTOS(DATE_VISIT)+INV_NBER TO &DR2&F11
         DO SIGNI
         INDE ON PAT_NAME+PAT_F_NAME+DTOS(DATE_VISIT)+INV_NBER TO &DR2&F12
      ENDIF
   ENDIF
   USE
   if file("&dr2&f2A")
      IF NET_USE("&DR2&F2",.T.,'1',10)
         DO SIGNI
         INDE ON DTOS(DATE_VISIT)+INV_NBER TO &DR2&F2
         DO SIGNI
         INDE ON PAT_CODTYP+DTOS(DATE_VISIT)+INV_NBER TO &DR2&F21
      ENDIF
   ENDIF
   USE
   if file("&dr2&f3A")
      IF NET_USE("&DR2&F3",.T.,'1',10)
         DO SIGNI
         INDE ON DTOS(DATE_VISIT)+INV_NBER TO &DR2&F3
      ENDIF
   ENDIF
   USE
   if file("&dr2&f4A")
      IF NET_USE("&DR2&F4",.T.,'1',10)
         DO SIGNI
         INDE ON DTOS(DATE_VISIT)+INV_NBER TO &DR2&F4
      ENDIF
   ENDIF
   USE
   If file("&dr2&f5A")
      IF NET_USE("&DR2&F5",.T.,'1',10)
         DO SIGNI
         INDE ON DOC_CODE+DTOS(DATE_VISIT)+INV_NBER TO &DR2&F5
      ENDIF
   ENDIF
   USE
ENDIF
clos all
RETURN

